package com.example.mntz.QuartzJob;

import com.example.mntz.dao.MyInvestmentMapper;
import com.example.mntz.model.Classs;
import com.example.mntz.model.Timelx;
import org.quartz.JobDataMap;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.quartz.QuartzJobBean;

public class TimeLxJob extends QuartzJobBean {
    @Autowired
    MyInvestmentMapper dao;
    @Override
    protected void executeInternal(JobExecutionContext context) throws JobExecutionException {
        JobDataMap jobDataMap = context.getMergedJobDataMap();
        // 业务逻辑
        String key = context.getJobDetail().getKey().getName();

        Timelx timelx =  dao.selectTimelx(Integer.valueOf(key));
        dao.insertzq(timelx);
        dao.addjie(timelx.getTimeLb());
    }
}
